<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改商品')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-product-edit" th:object="${product}">
            <input name="idProduct" th:field="*{idProduct}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">商品名称：</label>
                <div class="col-sm-8">
                    <input name="nameProduct" th:field="*{nameProduct}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">商品单价：</label>
                <div class="col-sm-8">
                    <input name="priceProduct" th:field="*{priceProduct}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">商品单位：</label>
                <div class="col-sm-8">
                    <input name="unitProduct" th:field="*{unitProduct}" class="form-control" type="text" required>
                </div>
            </div>
            <!--<div class="form-group">
                <label class="col-sm-3 control-label is-required">${comment}：</label>
                <div class="col-sm-8">
                    <input name="contentIDProduct" th:field="*{contentIDProduct}" class="form-control" type="text" required>
                </div>
            </div>-->
            <!--<div class="form-group">
                <label class="col-sm-3 control-label">产品创建时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="createdTime" th:value="${#dates.format(product.createdTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">产品更新时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="updatedTime" th:value="${#dates.format(product.updatedTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>-->
            <!--<div class="form-group">
                <label class="col-sm-3 control-label">${comment}：</label>
                <div class="col-sm-8">
                    <input name="createdUserid" th:field="*{createdUserid}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">${comment}：</label>
                <div class="col-sm-8">
                    <input name="updatedUserid" th:field="*{updatedUserid}" class="form-control" type="text">
                </div>
            </div>-->
            <!--<div class="form-group">
                <label class="col-sm-3 control-label">${comment}：</label>
                <div class="col-sm-8">
                    <input name="delete" th:field="*{delete}" class="form-control" type="text">
                </div>
            </div>-->
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/product";
        $("#form-product-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-product-edit').serialize());
            }
        }

        $("input[name='createdTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='updatedTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>